#!/bin/bash

#找出近十分钟启动的进程

now=$(date +%s)

#初始时间节点
let time=$now-600
#所有进程时间点
start=$(ps -elf | sed '1d' | awk '{print $12}')

ps -elf | sed '1d' | while read line;do
    #单个进程的时间戳
    one_time=$(date -d "$(echo "$line" | awk '{print $12}')" +%s)
    if [ $one_time -gt $time ];then
        echo "进程名：$( echo "$line" | awk '{for(b=15;b<=NF;b++) printf "%s ", $b; print ""}')"
    fi
    done
